<?php
class Pageley_Gateway_Database_CountResultSetExtractor implements Pageley_Gateway_Database_ResultSetExtractor {
    public function extractResults($resultSet) {
        $result = 0;
        if($resultSet->hasNext()) {
            $resultSet->next();
            $result = $resultSet->get("count");
        }
        return $result;
    }
}